# -*- encoding=utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
import requests

# 加上参数，禁止 chromedriver 日志写屏
option = webdriver.ChromeOptions()
# option.add_argument("headless")
wd = webdriver.Chrome(
    r'c:\chromedriver.exe',
   # chrome_options=option,
    # options=option #指定上方配置的选项参数
)
# 设置最大等待时长为 10秒
wd.implicitly_wait(2)
# 用get方法打开网址
wd.get('http://192.168.1.110')
wd.find_element(By.ID,'username').send_keys('admin')
wd.find_element(By.ID,'password').send_keys('le123456')
wd.find_element(By.CSS_SELECTOR,"[class='btn btn-primary login-btn']").click()
